﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace ChargingSystem4.EUc
{
    public partial class UcBackBB : UserControl
    {
        public UcBackBB()
        {
            InitializeComponent();
        }

        private void UcBackBB_Paint(object sender, PaintEventArgs e)
        {

            #region MyRegion
            int itemWidth = (this.Width / 11);
            int itemHeight = (this.Height / 11);

            int allHeight = this.Height - 3 - 6;
            int allWidth = this.Width - 3;

            Pen myPen = new Pen(Color.Red);

            myPen.Width = 3;


            #region A

            Point[] points = {
                new Point(3+6,0),
                new Point(3+6,allHeight),
                new Point(this.Width+6,allHeight)
             };
            e.Graphics.DrawLines(myPen, points);


            Point[] pointsAA = {
                new Point(3+6,0),
                new Point(0,12+6)
             };
            e.Graphics.DrawLines(myPen, pointsAA);

            Point[] pointsAB = {
                new Point(3+6,0),
                new Point(12+6,12+6)
             };
            e.Graphics.DrawLines(myPen, pointsAB);



            Point[] pointsBA = {
                new Point(allWidth,allHeight),
               new Point(allWidth-18,allHeight-9)
             };
            e.Graphics.DrawLines(myPen, pointsBA);

            Point[] pointsBB = {
                      new Point(allWidth,allHeight),
                     new Point(allWidth-18,allHeight+9)
             };
            e.Graphics.DrawLines(myPen, pointsBB);




            #endregion

            #region B


            Point[] pointsLine = {



                new Point(itemWidth*0 +6,itemHeight*10),

                new Point(itemWidth*1 +6,itemHeight*10),

                new Point(itemWidth*2+6,itemHeight*10),
                new Point(itemWidth*2+6,itemHeight*3),


                new Point(itemWidth*3+6,itemHeight*3),
                new Point(itemWidth*3+6,itemHeight*10),
                new Point(itemWidth*4+6,itemHeight*10),
                new Point(itemWidth*4+6,itemHeight*3),
                new Point(itemWidth*5+6,itemHeight*3),
                new Point(itemWidth*5+6,itemHeight*10),
                new Point(itemWidth*6+6,itemHeight*10),
                new Point(itemWidth*6+6,itemHeight*3),
                new Point(itemWidth*7+6,itemHeight*3),
                new Point(itemWidth*7+6,itemHeight*10),


             };
            e.Graphics.DrawLines(myPen, pointsLine);



            #endregion

            #endregion


        }
    }
}
